<template>
  <div>
    <div v-for="item in listArr" :key="item.id">
      <img :src="item.scene_pic_url">
      <h3>{{item.title}}</h3>
      <p>{{item.subtitle}}</p>
      <span>{{item.price_info | Rmb}} 起</span>
    </div>
    <van-pagination v-model="page" @change='go' :page-count="2" mode="simple" />
  </div>
</template>

<script>

// 导入请求函数
import  { getSpecialData } from "@/https/http";

export default {
    data(){
      return{
        page:1,
        size:10,
        listArr:[]
      }
    },
    mounted(){
      getSpecialData({page:this.page,size:this.size}).then((res)=>{
        console.log(res);
        this.listArr = res.data.data.data
        console.log(this.listArr);
      })
    },
    methods:{
      go(){
        getSpecialData({page:this.page,size:this.size}).then((res)=>{
        this.listArr = res.data.data.data
      })
      }
    }
}
</script>

<style scoped lang='less'>
  div{
      text-align: center;
      img{
        width: 100%;
      }
      h3{
        margin: 10px;
        font-size: 25px;
      }
      p{
        margin: 20px;
        font-size: 15px;
      }
      span{
        margin: 20px;
        color: red;
        font-size: 15px;
        display: block;
      }
  }
  /deep/ .van-pagination__page-desc{
    display: none;
  }
</style>